﻿// Decompiled with JetBrains decompiler
// Type: Bannerlord.ModuleManager.DependentModule
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;

#nullable enable
namespace Bannerlord.ModuleManager
{
  internal record DependentModule()
  {
    public string Id { get; set; } = string.Empty;

    public ApplicationVersion Version { get; set; } = ApplicationVersion.Empty;

    public bool IsOptional { get; set; } = false;

    public DependentModule(string id, ApplicationVersion version, bool isOptional)
    {
      this.Id = id;
      this.Version = version;
      this.IsOptional = isOptional;
    }

    [CompilerGenerated]
    protected virtual bool PrintMembers(StringBuilder builder)
    {
      RuntimeHelpers.EnsureSufficientExecutionStack();
      builder.Append("Id = ");
      builder.Append((object) this.Id);
      builder.Append(", Version = ");
      builder.Append((object) this.Version);
      builder.Append(", IsOptional = ");
      builder.Append(this.IsOptional.ToString());
      return true;
    }

    [CompilerGenerated]
    public override int GetHashCode()
    {
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      return ((EqualityComparer<Type>.Default.GetHashCode(this.EqualityContract) * -1521134295 + EqualityComparer<string>.Default.GetHashCode(this.\u003CId\u003Ek__BackingField)) * -1521134295 + EqualityComparer<ApplicationVersion>.Default.GetHashCode(this.\u003CVersion\u003Ek__BackingField)) * -1521134295 + EqualityComparer<bool>.Default.GetHashCode(this.\u003CIsOptional\u003Ek__BackingField);
    }

    [CompilerGenerated]
    public virtual bool Equals(DependentModule? other)
    {
      if ((object) this == (object) other)
        return true;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      return (object) other != null && this.EqualityContract == other.EqualityContract && EqualityComparer<string>.Default.Equals(this.\u003CId\u003Ek__BackingField, other.\u003CId\u003Ek__BackingField) && EqualityComparer<ApplicationVersion>.Default.Equals(this.\u003CVersion\u003Ek__BackingField, other.\u003CVersion\u003Ek__BackingField) && EqualityComparer<bool>.Default.Equals(this.\u003CIsOptional\u003Ek__BackingField, other.\u003CIsOptional\u003Ek__BackingField);
    }

    [CompilerGenerated]
    protected DependentModule(DependentModule original)
    {
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CId\u003Ek__BackingField = original.\u003CId\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CVersion\u003Ek__BackingField = original.\u003CVersion\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CIsOptional\u003Ek__BackingField = original.\u003CIsOptional\u003Ek__BackingField;
    }
  }
}
